package com.jhj.po.bm.mapper;

import java.math.BigDecimal;
import java.util.List;
import java.util.Map;

import org.apache.ibatis.annotations.Param;

import com.jhj.po.bm.model.OrderContract;
import com.jhj.vo.bm.ChartSearchVo;
import com.jhj.vo.bm.ChartVo;
import com.jhj.vo.bm.OrderContractSearchVo;
import com.jhj.vo.bm.SaleRankVo;

import tk.mybatis.mapper.common.Mapper;

public interface OrderContractMapper extends Mapper<OrderContract> {
	
	List<ChartVo> chartBySaleId(@Param("saleId")Integer saleId,@Param("startTime")Integer startTime,@Param("endTime")Integer endTime);

	/**
	 * 统计销售老师订单金额
	 * 
	 * */
	List<Map<String,String>> countSaleOrderMoney(ChartSearchVo vo);
	
	/**
	 * 统计销售老师订单数量
	 * 
	 * */
	List<Map<String,String>> countSaleOrderNum(ChartSearchVo vo);
	
	
	List<Map<Integer,BigDecimal>> sumSaleOrderPay(ChartSearchVo vo);
	
	/**
	 * 统计销售老师各个指标，签约数，总金额，总服务费用，总渠道费用.
	 * @param vo
	 * @return
	 */
	List<SaleRankVo> saleRankStat(ChartSearchVo searchVo);
	
	Integer statNum(ChartSearchVo searchVo);
	
	List<OrderContract> selectBySearchVo(OrderContractSearchVo searchVo);
	
	List<OrderContract> selectByListPage(OrderContractSearchVo searchVo);
}